<ion-header-bar class="bar-top text-center">
    <h1 class="title">最近鉴定</h1>
    <div class="buttons" ng-if="vm.condition.userId">
        <nav-button class="create" ng-click="vm.create()">新增</nav-button>
    </div>
</ion-header-bar>
<ion-view>
    <ion-content class="check recent-check" scroll="false">
        <div class="table-head row">
            <div class="col col-25">日期</div>
            <div class="col col-20" ng-if="vm.condition.doctorUserId">患者</div>
            <div class="col col-20" ng-if="vm.condition.userId">医生</div>
            <div class="col">鉴定项目</div>
            <div class="col col-25">鉴定状态</div>
        </div>
        <div class="check-box">
            <ion-scroll>
                <ion-refresher
                    pulling-text="下拉刷新"
                    on-refresh="vm.doRefresh()"></ion-refresher>
                <ion-list class="checks">
                    <ion-item class='item-remove-animate' ng-repeat="d in vm.data" ng-click="vm.detail(d.id)">
                        <div class="check-item row">
                            <div class="col col-25">{{d.createTime | date : 'yyyy-MM-dd'}}</div>
                            <div class="col col-20 extra" ng-if="vm.condition.doctorUserId">{{d.userName}}</div>
                            <div class="col col-20 extra" ng-if="vm.condition.userId">{{d.doctorName}}</div>
                            <div class="col">{{d.apprItem}}</div>
                            <div class="col col-25">
                                <span ng-class="{'over':d.apprState==1}" class="status">{{d.apprState==1?"已鉴定":d.apprState==0?"未鉴定":"拒绝鉴定"}}</span> <i class="arrow"></i>
                            </div>
                        </div>
                        <ion-option-button class="button-assertive"
                                           ng-click="delete(d)">
                          删除
                        </ion-option-button>
                    </ion-item>
                    <!-- <ion-item>
                    <div class="check-item row">
                        <div class="col col-25">2016-01-01</div>
                        <div class="col col-20">许宁宁</div>
                        <div class="col">血常规五项</div>
                        <div class="col col-25">
                            <span class="status over">已鉴定</span> <i class="arrow"></i>
                        </div>
                    </div>
                </ion-item>
                <ion-item>
                    <div class="check-item row">
                        <div class="col col-25">2016-01-01</div>
                        <div class="col col-20">许宁宁</div>
                        <div class="col">血常规五项</div>
                        <div class="col col-25">
                            <span class="status ">已鉴定</span>
                            <i class="arrow"></i>
                        </div>
                    </div>
                </ion-item>
                -->
            </ion-list>
            <ion-infinite-scroll
                    ng-if="!vm.nodata"
                    on-infinite="vm.loadMore()"
                    distance="1%"></ion-infinite-scroll>
        </ion-scroll>
    </div>

</ion-content>
</ion-view>